package com.hxzy.mapstruct;

import com.hxzy.controller.admin.product.req.ProductAddReq;
import com.hxzy.controller.admin.product.req.ProductEditReq;
import com.hxzy.controller.admin.product.resp.ProductResp;
import com.hxzy.entity.Product;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

@Mapper
public interface ProductMapStruct {
    ProductMapStruct INSTANCE= Mappers.getMapper(ProductMapStruct.class);

    Product convert(ProductAddReq req);

    Product convert(ProductEditReq req);

    ProductResp convert(Product db);
}
